﻿using BattleFury.Server.Wpf.Models;
using System.Windows;
using System.Windows.Controls;
using Xceed.Wpf.AvalonDock.Layout;

namespace BattleFury.Server.Wpf.Core.Selectors
{
	public class PanesTemplateSelector
		: DataTemplateSelector
	{
		public DataTemplate ServerViewTemplate { get; set; }

		public override DataTemplate SelectTemplate(object item, DependencyObject container)
		{
			var itemAsLayoutContent = item as LayoutContent;

			if (item is ServerModel)
				return ServerViewTemplate;

			return base.SelectTemplate(item, container);
		}
	}
}